import http from "@/api";

import { ResPage } from "@/api/interface";

import { AppAdvertiseEntity, AppAdvertiseVo } from "@/biz/interface/SysType";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取列表
export const getAppAdvertiseVoListApi = (params: {}) => {
  return http.post<ResPage<AppAdvertiseVo>>(moduleUrl + `/job/advvolist`, params);
};

// * 新增接口
export const saveAppAdvertiseApi = (appCarousels: AppAdvertiseEntity) => {
  return http.post(moduleUrl + `/job/advsave`, appCarousels);
};

// * 详情接口
export const getAppAdvertiseInfoApi = (params: { id: string }) => {
  return http.post<AppAdvertiseEntity>(moduleUrl + `/job/advinfo`, params);
};

// * 删除接口
export const deleteAppAdvertiseApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/job/advdelete`, params);
};

// * 修改状态接口
export const changeFlagActiveApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/job/advactive`, params);
};
